<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>左导航加右内容布局</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: Arial, sans-serif;
            display: flex;
        }

        nav {
            flex: 0 0 20%;
            /* 左侧导航栏宽度 */
            background-color: #f0f0f0;
            padding: 20px;
        }

        main {
            flex: 1;
            /* 右侧内容区域占据剩余空间 */
            padding: 20px;
        }

        nav ul {
            list-style: none;
            padding: 0;
        }

        nav li {
            margin-bottom: 10px;
        }

        nav a {
            text-decoration: none;
            color: #333;
            display: block;
            padding: 5px;
            border-radius: 5px;
            transition: background-color 0.3s ease;
        }

        nav a:hover {
            background-color: #ccc;
        }
    </style>
</head>

<body>
    <nav>
        <ul>
            <li><a href="#">1</a></li>
            <li><a href="#">2</a></li>
            <li><a href="#">3</a></li>
            <li><a href="#">4</a></li>
            <li><a href="#">5</a></li>
        </ul>
    </nav>
    <main>
        <h1>右侧内容区域</h1>
        <p>右侧文本区域。</p>
    </main>
</body>

</html>